﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinImageTag
{
    public partial class FrmSetPath : Form
    {
        public FrmSetPath()
        {
            InitializeComponent();
        }

        private void btnSet_Click(object sender, EventArgs e)
        {
            DialogResult dr = folderBrowserDialog1.ShowDialog();
            if(dr == DialogResult.OK)
            {
                lblPath.Text = folderBrowserDialog1.SelectedPath+"\\";
            }
        }

        private void FrmSetPath_Load(object sender, EventArgs e)
        {
            lblPath.Text =ConfigUtils.imgPath;
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            ConfigUtils.imgPath = lblPath.Text;
            FilesINI.WriteIni("config", "Path", ConfigUtils.imgPath);
            MessageBox.Show("保存成功", "保存", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Close();
        }
    }
}
